﻿using System.ServiceModel;

namespace CInChat.Communication
{
    [ServiceContract (CallbackContract = typeof(IChat))]
    public interface IChat
    {
        [OperationContract(IsOneWay = true)]
        void WarmUp();

        [OperationContract(IsOneWay = true)]
        void JoinChat(string user);

        [OperationContract(IsOneWay = true)]
        void ReceiveMessage(string user, string message);

        [OperationContract(IsOneWay = true)]
        void ReceiveWhisper(string from, string to, string message);

        [OperationContract(IsOneWay = true)]
        void LeaveChat(string user);

        [OperationContract(IsOneWay = true)]
        void UpdateUserList(string user);
    }

    public interface IChatChannel : IChat, IClientChannel
    {
    }
}
